package com.one.blocks.security.authc.smscode;

import org.springframework.security.authentication.AbstractAuthenticationToken;

/**
 * @author <a href="mailto:idler41@163.con">linfuxin</a> created on 2023-08-26 16:06:14
 */
public class SmsCodeAuthenticationToken extends AbstractAuthenticationToken {

    private final String mobile;
    private final String smsCode;

    public SmsCodeAuthenticationToken(String mobile, String smsCode) {
        super(null);
        this.mobile = mobile;
        this.smsCode = smsCode;
    }

    @Override
    public Object getCredentials() {
        return smsCode;
    }

    @Override
    public Object getPrincipal() {
        return mobile;
    }
}
